Just CS today
Today was my least favourite kind of problem; where you simply implement a CS algorithm.
I already had an implementation of A* floating around due to a past problem like that, so it was simply a matter of writing the code to find the allowed next steps. It's quite a chunk of code, but honestly nothing interesting.
I'll try to keep thinking about it, there's probably something more bespoke you can do here—but I'm pretty busy today (and the next couple days), so hey, if I can just reuse an algorithm I already have, that's a win in my book.